def out_can_play(clock):
    def can_play(fn):
        def action(name, game):
            if clock <= 21:
                fn(name, game)
            else:
                print('too late to play')

        return action

    return can_play


@out_can_play(21)
def play_game(name, game):
    print(name, 'is playing', game)


play_game('jerry', 'csgo')
